package com.cevent.zhanniu.manager;/**
 * Created by Cevent on 2020/11/17.
 */

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.core.env.Environment;

/**
 * @author cevent
 * @description
 * @date 2020/11/17 13:59
 */
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {

    //1. 调用log日志框架:springboot默认继承slf4j框架，实现为logback和（本项目）log4j
    private static final Logger LOG= LoggerFactory.getLogger(EurekaApplication.class);

    public static void main(String[] args) {
        SpringApplication springApplication=new SpringApplication(EurekaApplication.class);
        //获取spring app环境
        Environment environment=springApplication.run(args).getEnvironment();
        LOG.info("cevent-站牛网-eureka注册中心启动成功...");
        //SpringApplication.run(EurekaApplication.class,args);
        //获取端口
        LOG.info("Eureka地址： \thttp://127.0.0.1:{}",environment.getProperty("server.port"));
    }
}
